package com.dong.sqltoy.model;

import org.sagacity.sqltoy.config.annotation.Column;
import org.sagacity.sqltoy.config.annotation.Entity;
import org.sagacity.sqltoy.config.annotation.Id;
import org.sagacity.sqltoy.config.annotation.Tenant;

import java.io.Serial;
import java.math.BigDecimal;
import java.time.LocalDateTime;

@Entity(tableName = "`order`")
public class Order implements java.io.Serializable{
    @Serial
    private static final long serialVersionUID = 1L;

    @Id
    @Column(name = "id")
    private String id;
    @Column(name = "user_id")
    private String userId;
    @Tenant(field = "tenant_id")
    @Column(name = "tenant_id")
    private String tenantId;
    @Column(name = "amount")
    private BigDecimal amount;
    @Column(name = "create_time")
    private LocalDateTime createTime;
    @Column(name = "creator")
    private String creator;
    @Column(name = "updater")
    private String updater;

    public Order() {
    }

    public Order(String id, String userId, String tenantId, BigDecimal amount, LocalDateTime createTime) {
        this.id = id;
        this.userId = userId;
        this.tenantId = tenantId;
        this.amount = amount;
        this.createTime = createTime;
    }

    public Order(String id, String userId, String tenantId, BigDecimal amount, LocalDateTime createTime, String creator, String updater) {
        this.id = id;
        this.userId = userId;
        this.tenantId = tenantId;
        this.amount = amount;
        this.createTime = createTime;
        this.creator = creator;
        this.updater = updater;
    }

    // Getters and Setters
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTenantId() {
        return tenantId;
    }

    public void setTenantId(String tenantId) {
        this.tenantId = tenantId;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public String getCreator() {
        return creator;
    }

    public void setCreator(String creator) {
        this.creator = creator;
    }

    public String getUpdater() {
        return updater;
    }

    public void setUpdater(String updater) {
        this.updater = updater;
    }
}